package com.cim120.commons.cip.model;

/**
 * Created by tonydeng on 14-9-4.
 */
public class ImageInfo {
    private int width;
    private int height;
    private String format; //图片类型
    private Integer orientation; //图片方向
    private String savePath;

    public ImageInfo(){

    }

    public ImageInfo(int width,int height){
        this.width = width;
        this.height = height;
    }

    public ImageInfo(int width,int height,String savePath){
        this.width = width;
        this.height = height;
        this.savePath = savePath;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public Integer getOrientation() {
        return orientation;
    }

    public void setOrientation(Integer orientation) {
        this.orientation = orientation;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public float getScale() {
        return (float) width / height;
    }

    public String getSavePath() {
        return savePath;
    }

    public void setSavePath(String savePath) {
        this.savePath = savePath;
    }

    @Override
    public String toString() {
        return "ImageInfo{" +
                "width=" + width +
                ", height=" + height +
                ", format='" + format + '\'' +
                ", orientation=" + orientation +
                ", savePath='" + savePath + '\'' +
                '}';
    }
}
